package day3;

/**
 * @author joker
 * @date 2022/4/13 0013 - 21:36
 */
public class Test02 {
    int a;
    int b;
    public int m1() throws TestException {
        a=1;
        b=1;
        try {
            a+=1;
            int[] aa=null;
            aa.toString();
            return a;
        } catch (Exception e) {
            throw new TestException("a");
//            e.printStackTrace();
//            System.out.println(e.getMessage());

        } finally {
            a=7;
            b+=1;

        }
//        return 5;
    }
    public static void main(String[] args) throws InterruptedException {
        Test02 test02 = new Test02();
        System.out.println(test02.a);
        System.out.println(test02.b);
        System.out.println("^^^^^^^^^^^^^^^");

        try {
            System.out.println(test02.m1());
        } catch (TestException e) {
            System.out.println(e.getMessage());
        }
        System.out.println(test02.a);
        System.out.println(test02.b);
        int a=0;
        while(a<1000000){
            System.out.println(a);
            a++;
            Thread.sleep(2000);
        }
    }
}
